﻿import idv.ben.gc4flash.chart.*;
import idv.ben.gc4flash.dataLine.*;
import idv.ben.gc4flash.encode.*;
import idv.ben.gc4flash.fill.*;
import idv.ben.gc4flash.util.*;
/**
* Solid fill 填色方式，用來填圖形的背景色，或是整張圖片的背景色<br>
* 參考 Google Chart API：<a href="http://code.google.com/apis/chart/#solid_fill" target="_blank">http://code.google.com/apis/chart/#solid_fill</a><br>
*/
class idv.ben.gc4flash.fill.SolidFill implements IFill {
	//<bg or c> is bg for background fill or c for chart area fill.
	private var fillArea:String;
	//<color> is an RRGGBB format hexadecimal number.
	private var color:String;
	/**
	* 建構子
	* @param fillArea 填色區域：
	* 		<ul>
	*		<li>{@link idv.ben.gc4flash.fill.FillType#FILL_TYPE_BG} = "bg"</li>
	*		<li>{@link idv.ben.gc4flash.fill.FillType#FILL_TYPE_CHART} = "c"</li>
	*		</ul>
	* @param color 顏色字串，請參考 Google Chart API：<a href="http://code.google.com/apis/chart/#rgb" target="_blank">http://code.google.com/apis/chart/#rgb</a>
	*/
	//chf=<bg or c>,s,<color>|<bg or c>,s,<color>
	function SolidFill(fillArea:String, color:String) {
		this.fillArea = fillArea;
		this.color = color;
	}
	/**
	* 將填色設定，組成 URL 參數字串
	* <br>
	* <img src="http://chart.apis.google.com/chart?cht=lc&chd=s:pqokeYONOMEBAKPOQVTXZdecaZcglprqxuux393ztpoonkeggjp&chco=FF0000&chls=4.0,3.0,0.0&chs=200x125&chxt=x,y&chxl=0:|Jun|July|Aug|1:||20|30|40|50&chf=bg,s,efefef"><br>
	* chf=bg,s,efefef<br>
	* <br>
	* <img src="http://chart.apis.google.com/chart?cht=s&chd=s:pqokeYONOMEPOQVTXZdeca,Zcglprqxuuxztpoonkeggjp&chco=FF0000&chls=4.0,3.0,0.0&chs=200x125&chxt=x,y&chxl=0:|Jun|July|Aug|1:||20|30|40|50&chf=bg,s,efefef|c,s,000000"><br>
	* chf=bg,s,efefef|c,s,000000<br>
	* <br>
	* <img src="http://chart.apis.google.com/chart?cht=bhs&chs=200x125&chd=s:Hell8&chbh=15&chf=bg,s,FFF2CC&chxt=x,y&chxl=0:||20|30|40|50|1:|Oct|Sep|Aug|July|Jun"><br>
	* chf=bg,s,FFF2CC<br>
	* @return URL 參數字串
	*/
	public function toChartData():String {
		return fillArea+",s,"+color;
	}
}
